package sv.gob.mh.dgii.model;

// Generated Dec 10, 2007 4:52:21 PM by Hibernate Tools 3.2.0.beta7

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgRecorrido generated by hbm2java
 */
@Entity
@Table(name = "CG_RECORRIDO", schema = "UPET", uniqueConstraints = {})
public class CgRecorrido implements java.io.Serializable {

	// Fields    

	/**
	 * 
	 */
	private static final long serialVersionUID = -2368302010490727556L;

	private CgRecorridoId id;

	private CgCaso cgCaso;

	private TbUnidad tbUnidad;

	private Date fhingreso;

	private Date fhsalida;

	private String mtipoMovi;

	private Date fhasignacion;

	private Date fhinicProc;

	private Date fhcierreCaso;

	private String mestatus;

	private Date fapertura;

	private Integer ccicloActual;

	private Integer cetapaActual;

	private long nruta;
	
	private Date fhAprobCierre; 
	
	// Constructors

	/** default constructor */
	public CgRecorrido() {
	}

	/** minimal constructor */
	public CgRecorrido(CgRecorridoId id, CgCaso cgCaso, TbUnidad tbUnidad,
			Date fhingreso, String mtipoMovi, String mestatus,
			Integer ccicloActual, Integer cetapaActual, long nruta) {
		this.id = id;
		this.cgCaso = cgCaso;
		this.tbUnidad = tbUnidad;
		this.fhingreso = fhingreso;
		this.mtipoMovi = mtipoMovi;
		this.mestatus = mestatus;
		this.ccicloActual = ccicloActual;
		this.cetapaActual = cetapaActual;
		this.nruta = nruta;
	}

	/** full constructor */
	public CgRecorrido(CgRecorridoId id, CgCaso cgCaso, TbUnidad tbUnidad,
			Date fhingreso, Date fhsalida, String mtipoMovi, Date fhasignacion,
			Date fhinicProc, Date fhcierreCaso, String mestatus,
			Date fapertura, Integer ccicloActual, Integer cetapaActual, long nruta,
			Date fhAprobCierre) {
		this.id = id;
		this.cgCaso = cgCaso;
		this.tbUnidad = tbUnidad;
		this.fhingreso = fhingreso;
		this.fhsalida = fhsalida;
		this.mtipoMovi = mtipoMovi;
		this.fhasignacion = fhasignacion;
		this.fhinicProc = fhinicProc;
		this.fhcierreCaso = fhcierreCaso;
		this.mestatus = mestatus;
		this.fapertura = fapertura;
		this.ccicloActual = ccicloActual;
		this.cetapaActual = cetapaActual;
		this.nruta = nruta;
		this.fhAprobCierre = fhAprobCierre;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "ncorrelativo", column = @Column(name = "N_CORRELATIVO", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)),
			@AttributeOverride(name = "ncaso", column = @Column(name = "N_CASO", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)),
			@AttributeOverride(name = "cunidad", column = @Column(name = "C_UNIDAD", unique = false, nullable = false, insertable = true, updatable = true, length = 5)) })
	public CgRecorridoId getId() {
		return this.id;
	}

	public void setId(CgRecorridoId id) {
		this.id = id;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
	@JoinColumn(name = "N_CASO", unique = false, nullable = false, insertable = false, updatable = false)
	public CgCaso getCgCaso() {
		return this.cgCaso;
	}

	public void setCgCaso(CgCaso cgCaso) {
		this.cgCaso = cgCaso;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD", unique = false, nullable = false, insertable = false, updatable = false)
	public TbUnidad getTbUnidad() {
		return this.tbUnidad;
	}

	public void setTbUnidad(TbUnidad tbUnidad) {
		this.tbUnidad = tbUnidad;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_SALIDA", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhsalida() {
		return this.fhsalida;
	}

	public void setFhsalida(Date fhsalida) {
		this.fhsalida = fhsalida;
	}

	@Column(name = "M_TIPO_MOVI", unique = false, nullable = false, insertable = true, updatable = true, length = 2)
	public String getMtipoMovi() {
		return this.mtipoMovi;
	}

	public void setMtipoMovi(String mtipoMovi) {
		this.mtipoMovi = mtipoMovi;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_ASIGNACION", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhasignacion() {
		return this.fhasignacion;
	}

	public void setFhasignacion(Date fhasignacion) {
		this.fhasignacion = fhasignacion;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INIC_PROC", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhinicProc() {
		return this.fhinicProc;
	}

	public void setFhinicProc(Date fhinicProc) {
		this.fhinicProc = fhinicProc;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_CIERRE_CASO", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhcierreCaso() {
		return this.fhcierreCaso;
	}

	public void setFhcierreCaso(Date fhcierreCaso) {
		this.fhcierreCaso = fhcierreCaso;
	}

	@Column(name = "M_ESTATUS", unique = false, nullable = false, insertable = true, updatable = true, length = 1)
	public String getMestatus() {
		return this.mestatus;
	}

	public void setMestatus(String mestatus) {
		this.mestatus = mestatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_APERTURA", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFapertura() {
		return this.fapertura;
	}

	public void setFapertura(Date fapertura) {
		this.fapertura = fapertura;
	}

	@Column(name = "C_CICLO_ACTUAL", unique = false, nullable = false, insertable = true, updatable = true, precision = 5, scale = 0)
	public Integer getCcicloActual() {
		return this.ccicloActual;
	}

	public void setCcicloActual(Integer ccicloActual) {
		this.ccicloActual = ccicloActual;
	}

	@Column(name = "C_ETAPA_ACTUAL", unique = false, nullable = false, insertable = true, updatable = true, precision = 5, scale = 0)
	public Integer getCetapaActual() {
		return this.cetapaActual;
	}

	public void setCetapaActual(Integer cetapaActual) {
		this.cetapaActual = cetapaActual;
	}

	@Column(name = "N_RUTA", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public long getNruta() {
		return this.nruta;
	}

	public void setNruta(long nruta) {
		this.nruta = nruta;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_APROB_CIERRE", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhAprobCierre() {
		return fhAprobCierre;
	}

	public void setFhAprobCierre(Date fhAprobCierre) {
		this.fhAprobCierre = fhAprobCierre;
	}

}
